import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: "/index",
      meta:{
        title: "首页"
      }
    },
    {
      path: '/index',
      name: 'index',
      component: () => import("../components/index/index"),
      meta:{
        title: "首页"
      }
    },
    {
      path: '/login',
      name: 'login',
      component: () => import("../components/login/login"),
      meta:{
        title: "登录"
      }
    },
    {
      path: '/register',
      name: 'register',
      component: () => import("../components/register/register"),
      meta:{
        title: "注册"
      }
    },
    {
      path: '/detail',
      name: 'detail',
      component: () => import("../components/detail/detail"),
      meta:{
        title: "详情"
      }
    },
    {
      path: '/write',
      name: 'write',
      component: () => import("../components/write/write"),
      meta:{
        title: "写文章"
      }
    },
    {
      path: '/profile',
      name: 'profile',
      component: () => import("../components/profile/profile"),
      meta:{
        title: "我的博客"
      }
    },
  ],
  mode:"history"
})

